package com.yuanfeng.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.commoms.vo.goodscat.WebCatMenuVO;
import com.yuanfeng.goods.dto.GoodsBrandDTO;
import com.yuanfeng.goods.entity.GoodsBrandEntity;
import com.yuanfeng.goods.vo.GoodsBrandCatParamVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.yuanfeng.goods.entity.GoodsBrand
 */
@Mapper
public interface GoodsBrandMapper extends BaseMapper<GoodsBrandEntity> {

    /**
     * 查询品牌分类列表
     * @param webCatMenus
     * @return
     */
    List<GoodsBrandCatParamVO> selectBrandCats(@Param("list")List<WebCatMenuVO> webCatMenus);


    /**
     * 新增品牌
     * @param param
     */
    void insertBrand(@Param("param") GoodsBrandDTO param);

    /**
     * 修改品牌
     * @param param
     */
    void updateBrand(@Param("param")GoodsBrandDTO param);


    /**
     * 分页查询品牌集合
     *
     * @param page
     * @param merchantGoodsBrandReq
     * @return
     */
    IPage<GoodsBrandEntity> queryBrandList(IPage<GoodsBrandEntity> page, @Param("param") GoodsBrandDTO merchantGoodsBrandReq);


    /**
     * 查询店铺品牌信息
     * @param param
     * @return
     */
    List<GoodsBrandEntity> selectByShopId(@Param("param")GoodsBrandDTO param);

    /**
     * 查询当前分类已绑定的品牌
     * @param catId
     * @return
     */
    List<Integer> querybindBranIds(@Param("catId")Integer catId);
}




